(function(){
    var okw=$('#okw').val();
    changePart(okw);

    // todo  切换分类function
    function changePart(kw){
        $(".part").css("display","none");
        $(".head li").removeClass("current");
        switch (kw){
            case "待支付":
                $(".head li:nth-child(2)").addClass("current");
                $(".waiting-to-pay").css("display","block");
                break;
            case "待发货":
                $(".head li:nth-child(3)").addClass("current");
                $(".waiting-to-deliver").css("display","block");
                break;
            case "待收货":
                $(".head li:nth-child(4)").addClass("current");
                $(".waiting-to-sure").css("display","block");
                break;
            case "待评价":
                $(".head li:nth-child(5)").addClass("current");
                $(".waiting-to-evaluate").css("display","block");
                break;
            case "全部":
                $(".head li:nth-child(1)").addClass("current");
                $(".all-order").css("display","block");
                break;
        }
    }

    //todo 头部分类点击
    $(".head li").click(function(){
        var text=$(this).text();
        changePart(text);
    })
})();
